﻿using System.Drawing;
using System.IO;
using EPiServer.ImageLibrary;
using NUnit.Framework;
using OpenWaves.EPiServer;
using OpenWaves.ImageTransformations;

namespace OpenWaves.UnitTests.EPiServer
{
    [TestFixture]
    public class EPiImageTransformationServiceTests
    {
        [Test]
        public void Test()
        {
            var service = new EPiImageTransformationService(new ImageService());
            using (var output = new MemoryStream())
            {
                service.TransformImage(new MemoryStream(Resources.WhiteSquare), output, ImageFormat.Png, new ScaleToFillTransformation(500, 500));

                output.Seek(0, SeekOrigin.Begin);
                Image.FromStream(output);
            }
        }
    }
}